package view.impl.menu;

import java.util.Map;
import java.util.TreeMap;

import view.impl.menu.items.IMenuItem;

public class CascadedMenuLayer extends MenuLayer{
	
	Map<Integer, CascadedMenuLayer> connMenuItems = new TreeMap<Integer, CascadedMenuLayer>();
	
	public CascadedMenuLayer() {
		
	}
	
	public boolean addMenuItem(IMenuItem item, int id, CascadedMenuLayer targetLayer) {
		connMenuItems.put(id, targetLayer);
		return super.addMenuItem(item, id);
	}
	
	public CascadedMenuLayer getTargetLayer(int menuItemId) {
		return connMenuItems.get(menuItemId);
	}
}
